<template>
	<view class="book-item-text" @tap="pik()">
		<view class="">
			<image :src="books.bookImg" mode=""></image>
		</view>
		<view class="comment">
			<h2>{{books.bookName}}</h2>
			<p>作者：{{books.bookAuthor}}</p>
			<p>{{books.bookIntro}}</p>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props: {
			books: {
				type: Object,
				required: true
			}
		},
		methods: {
			pik(){
				console.log(this.books.bookId)
				uni.navigateTo({
					url:"/pages/bookdetailed/bookdetailed?id="+this.books.bookId
				})
			}
		}
	}
</script>

<style>
	.comment p{
		color: gray;
		overflow: hidden;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		margin-top: 10rpx;
	}
	.comment h2{
		margin-top: 10rpx;
		margin-bottom: 20rpx;
	}
	.comment{
		margin-left: 20rpx;
		
	}
	.book-item-text{
		height: 260rpx;
		font-size: 24rpx;
		line-height: 34rpx;
		margin-bottom: 20rpx;
		display: flex;
	}
	.book-item-text image{
		width: 200rpx;
		height: 260rpx;
		border-radius: 10rpx;
	}
</style>
